home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / GAF200B.ZIP / DOC / FCL.DOC < prev    next >
Encoding:
Text File  |  1994-10-29  |  28.7 KB  |  737 lines

  1. Introduction
  2.    This document explains how to use FCL and build a control
  3.    simulation under GAF.  Following topics are covered in this
  4.    document:
  5.       - brief description of basic concept
  6.       - simple steps to build a simulation
  7.       - FCL reference manual
  8.  
  9.    A segment, the basic module in GAF, is a text file contains
  10.    these information for (or related to) a segment.
  11.       - configuration information
  12.       - variable declarations (IN, OUT, INOUT, and LOCAL)
  13.       - symbol (fuzzy membership set) declarations
  14.       - enable condition and cycle time of the segment
  15.       - initialization
  16.       - reset
  17.       - pre-processing
  18.       - post-processing
  19.       - fuzzy rules
  20.       - data table(s)
  21.  
  22.    A typical FCL segment layout will look like this.
  23.  
  24.       FCL construct                    Refer to Section
  25.       -------------------------------  ------------------
  26.       configuration_declaration        Configuration
  27.  
  28.       segment_declaration              Declare segment
  29.  
  30.          cycle_declaration             Cycle Time
  31.  
  32.          variable_declaration(s)       Declare variable
  33.  
  34.          enable_declaration            Enable condition
  35.  
  36.          symbol_declaration(s)         Declare fuzzy symbol
  37.  
  38.          preset_declaration(s)         Preset
  39.  
  40.          init_declaration              Initialization
  41.  
  42.          reset_declaration             Reset
  43.  
  44.          pre_processing                Pre-processing
  45.  
  46.          post_processing               Post-processing
  47.  
  48.          rule_declaration(s)           Define rule
  49.  
  50.          data_declaration(s)           Data Table
  51.  
  52.       end_declaration                  Declare segment
  53.  
  54.    Just like dividing a control system into several manageable
  55.    portions, GAF allows a control system to be divided into
  56.    segments.  For example, a simulated control environment under
  57.    GAF may have these different segments:
  58.        - control segment(s)
  59.        - reference calculation and supporting segment(s)
  60.        - simulation (or feedback) segment(s)
  61.        - evaluation segment
  62.    The feedback and evaluation segments are used for simulation and
  63.    adaptation.
  64.  
  65. Segment Construction
  66.    To construct a segment is quite similar to construct a simple
  67.    program. The followings are simple steps to construct a GAF
  68.    segment.
  69.  
  70.    1. Define all variables for this segment:
  71.       All variables must be declared before they can be used either
  72.       by fuzzy rules or any statements in this segment.  There are
  73.       four types of variables: IN, OUT, INOUT, and LOCAL.
  74.  
  75.       IN variables 
  76.          IN variables are used as "references" in this segment.  IN
  77.          variables must be in one of the categories:
  78.          -  calculated by other segment (as OUT)
  79.          -  an input from real world, i.e. a sensor, this input may
  80.             be an OUT from a feedback segment in a simulation.
  81.          -  application constants, can be modified through
  82.             interactive  interface during simulation
  83.  
  84.       OUT variables 
  85.          OUT variables are calculated outputs by this segment.  OUT
  86.          variables are either:
  87.          -  an output signal to a real world device
  88.          -  be used by other segment as IN variables
  89.          -  for diagnostic purpose
  90.          -  evaluation result
  91.  
  92.       INOUT variables
  93.          INOUT variables are both referenced and modified by this
  94.          segment, i.e., it is the combination of both IN and OUT
  95.          variables.  Normally INOUT variables are referenced by
  96.          this segment and other segments. 
  97.  
  98.       All of the IN, OUT, and INOUT variables are visible to other
  99.       segments, i.e. other segments can use this segment's OUT as
  100.       its IN. 
  101.  
  102.       LOCAL variables
  103.          LOCAL variables are local to this segment.  Normally,
  104.          local variables are used to store temporary values so it
  105.          can be used by fuzzy rules or other statements within the
  106.          segment.
  107.  
  108.    2. Fuzzy membership set declaration.
  109.       The second step would be define the fuzzy membership set. 
  110.       GAF uses four points for each set.  In general, fuzzy sets
  111.       should be defined for  each variable that is used in the
  112.       fuzzy rules.  For example, as described in the following
  113.       figure.  A simple way to define membership sets for a
  114.       variable is to equaly divide the range of the variable into
  115.       six to obtain five sets - very low (VL), low (LO), medium
  116.       (M), high (HI), and very high (VH).
  117.  
  118.         -----     -     -     -     -----
  119.              \   / \   / \   / \   / 
  120.               \ /   \ /   \ /   \ /
  121.                X     X     X     X
  122.               / \   / \   / \   / \
  123.              /   \ /   \ /   \ /   \
  124.       +-----+-----+-----+-----+-----+-----+
  125.       -1  -0.67 -0.33   0    0.33  0.67   1
  126.       | very low  |  medium   | very high |
  127.             |    low    |   high    |
  128.  
  129.       As the above diagram shows these five membership sets are
  130.       symmatrically divided.  After determine each membership set,
  131.       then, use these declarations for the starting point.
  132.          SYMBOL very_low  (-1.00, -1.00, -0.67, -0.33, 1.0)
  133.          SYMBOL low       (-0.67, -0.33, -0.33   0,    1.0)
  134.          SYMBOL medium    (-0.33,  0,     0,     0.33, 1.0)
  135.          SYMBOL high      ( 0,     0.33,  0.33,  0.67, 1.0)
  136.          SYMBOL very_high ( 0.33,  0.67,  1,     1,    1.0) 
  137.  
  138.    3. Define fuzzy rules.
  139.       Defining fuzzy rules is straight forward.  For example, based
  140.       on common sense to control a water heater, a simple rule may
  141.       be like:
  142.          "if water usage is heavy and water is cold, then
  143.          the gas fuel valve to heat the tank must be full open"
  144.       This idea can turn into a rule like:
  145.          IF water_usage IS heavy AND water IS cold
  146.          THEN fuel_valve IS full_open
  147.       Where water_usage and water are IN variables, fuel_valve is
  148.       an OUT variable; heavy, cold, and full_open are membership
  149.       sets defined for corresponding variables.
  150.       Note that all variables that are part of "THEN" statement
  151.       must be declared as OUT or INOUT.
  152.       Instead of defining fuzzy rule, data set can be used to
  153.       replace fuzzy rules.  Please refer to step 8 for more
  154.       details.
  155.  
  156.    4. Initializes the segment.
  157.       The initialization of a segment is to initialize all outputs
  158.       (OUT and INOUT variables) and its local variables.  The
  159.       initialization will be executed when the system "comes up"
  160.       (i.e., the first time it runs the segment) or by the request
  161.       from interactive interface.  All initialization formulas must
  162.       be stated like this:
  163.          what's in the text   remarks
  164.          -------------------  -----------------------------    
  165.          INITIALIZATION       must have this key word
  166.             ... ;             statements for initialization
  167.                                  each statement must end with ';'
  168.          RESET                optional key word for
  169.             ... ;                reset processing statements
  170.          PRE_PROCESSING       optional key word for
  171.             ... ;                pre-processing statements
  172.          POST_PROCESSING      optional key word for 
  173.             ... ;                post-processing statements
  174.          END;                 must end this key word (with ';') 
  175.  
  176.       For example, for the above water heat control, the segment
  177.       should initialize the fuel_valve to close.
  178.          INITIALIZATION
  179.             fuel_valve = 0;
  180.          PRE_PROCESSING
  181.             ...
  182.          END;
  183.  
  184.    5. Reset processing
  185.       Similar to initialization, the reset processing is to reset
  186.       the segment  when the segment is disabled.  The reset
  187.       processing is only necessary  when it is different from the
  188.       initialization.
  189.  
  190.    6. Pre-processing and post-processing
  191.       The pre-processing is a set of statements to be calculated
  192.       before the fuzzy rules are inferenced.  The post-processing
  193.       is a set of statements to be calculated after the fuzzy rules
  194.       are inferenced.  The formulas can be used for calculating
  195.       references or other simple mathematical models. 
  196.       Pre-processing is calculated before any fuzzy rule been
  197.       evaluated, so the results of these formulas may be used by
  198.       fuzyy rules to inference the result.  Post-processing is
  199.       calculated after the inference of fuzzy rules.
  200.  
  201.    7. Segment enable condition and its cycle time
  202.       The enable condition determines whether the segment shoud run
  203.       or not.  If enable condition is not specified GAF treats the
  204.       segment as enabled all the time.  The cycle time determines
  205.       how frequently the segment will run, cycle time can be
  206.       adjusted during simulation.
  207.  
  208.    8. Build data table
  209.       An alternative of defining fuzzy rules is to use data set.
  210.       Whether it is measured data from the field or data generated 
  211.       from a modeling program, the data set can be plugged into
  212.       GAF. Data set must be arranged into spread sheet like table,
  213.       and using the key DATA_TABLE to indicate the contents and the
  214.       order of data in the table.  Note that the data set must be
  215.       a complete data set, i.e., it must cover the entire range of
  216.       each variable.
  217.  
  218.  
  219. Format Covention
  220.    Conventions used for describing FCL syntax (format):
  221.       - all key words are in upper case
  222.       - key words are not case sensitive, but must be the same
  223.       - options are enclosed within breckets []
  224.       - < | | > indicates selection of one out of two or more items
  225.  
  226. Comment
  227.    A comment can be anywhere in the segment, it starts with '!' and
  228.    lasts to the end of the line.
  229.  
  230. Declare Segment: segment_declaration, end_declaration
  231.    There are three types of segments: normal control segment,
  232.    feedback segment, and evaluation segment.
  233.    Format for segment_declaration:
  234.       FORMAT   < SEGMENT
  235.                | FEEDBACK
  236.                | EMUL_SEGMENT
  237.                | EVAL_SEGMENT > seg_name
  238.                   . . . seg_contents . . .
  239.                END seg_name ;
  240.       Where
  241.          seg_name : the name of the segment
  242.          seg_contents are statements for this segment
  243.       Example
  244.          SEGMENT main_control
  245.             CYCLE_TIME 0.1
  246.             . . .
  247.          END main_control;
  248.  
  249.    As shown in the FCL construct, a segment is enclosed within two
  250.    keys.  The first key can be one of the followings, followed by
  251.    the name of the segment.
  252.       SEGMENT        for normal (control) segment
  253.       EMUL_SEGMENT & FEEDBACK
  254.                      for emulation/feedback segment
  255.       EVAL_SEGMENT   for adaptive evaluation segment
  256.    A segment must always end with the END keyword followed by the
  257.    name of the segment.
  258.  
  259.    Note that in simulation and adapt modes the feedback segment's
  260.    output value will be feed back to the control segment(s) based
  261.    on variable name(s).
  262.  
  263. Cycle Time: cycle_declaration
  264.       FORMAT   CYCLE_TIME value
  265.       Where
  266.          value : the cycle time in seconds
  267.       Example
  268.          SEGMENT main_control
  269.             CYCLE_TIME 0.1
  270.             . . .
  271.          END main_control;
  272.  
  273.    Cycle_time defines how frequently the segment runs.  For example
  274.    a value of 0.1 defines the segment runs every 100 milliseconds. 
  275.    Note that actual delay time between two consecutive runs may be
  276.    longer than 100 milliseconds if GAF is heavily loaded with
  277.    segments.
  278.  
  279.  
  280. Declare Variable: variable_declaration
  281.    There are four different kinds of variables: IN, OUT, INOUT, and
  282.    LOCAL.  The segment will only read (reference) from those IN
  283.    variables, and write (generate new value) to the OUT variables. 
  284.    The segment can read and write to both INOUT and LOCAL
  285.    variables, however, local variables are not visible from outside
  286.    the segment.
  287.       FORMAT   var_type var_name (min_value, max_value)
  288.       Where
  289.          var_type    : one of the 4 types IN, OUT, INOUT, LOCAL
  290.          var_name    : the variable name
  291.          min_value   : the minimum value of the variable
  292.          max_value   : the maximum value of the variable
  293.       Example
  294.          SEGMENT main_control
  295.             CYCLE_TIME 0.1
  296.  
  297.             IN    Reference   (0, 100)
  298.             OUT   Result   (0, 10)
  299.             LOCAL Temp     (-1, 1)
  300.             . . .
  301.          END main_control;
  302.    Variable name must be unique in the same segment.  A variable
  303.    should not be declared as an output variable (OUT or INOUT) in
  304.    more than one segments.
  305.  
  306.    GAF Global Variable
  307.  
  308.       DELTA_TIME:
  309.          The delta_time variable is the time gap between the
  310.          current segment run time and the last time the segment
  311.          ran.  Delta time is in seconds (floating point), it can be
  312.          used only in math processing.
  313.          Example:
  314.             Speed = ( Position - Last_position ) / Delta_time ;
  315.  
  316. Declare Fuzzy Symbol: symbol_declaration
  317.    The basic fuzzy membership set definition is a trapezoid with 4
  318.    points below, low, high, above, and a max_truth value.
  319.  
  320.                    _____      <----- max_truth: maximum truth value
  321.                   /     \
  322.                  /       \
  323.                 /         \
  324.         -------+--+-----+--+------- <----- 0: minimum truth value
  325.                |  |     |  |
  326.                |  |     |  above: false above
  327.                |  |     high: high truth
  328.                |  low: low truth
  329.                below: false below
  330.  
  331.    As depicted in the diagram above, the truth for different values
  332.    are:
  333.       if value <= below          truth = 0
  334.       if value >= above          truth = 0
  335.       if low <= value <= high    truth = max_truth
  336.       for other values use interpolation to derive truth
  337.    The range of truth value is 0.0 to 1.0.
  338.  
  339.       FORMAT   SYMBOL sym_name [OF var_name] fuzzy_membership_set
  340.       Format for fuzzy_membership_set
  341.             ( below, low, high, above [, truth [, center ] ] )
  342.       Where
  343.          sym_name : the name of the symbol
  344.          var_name : the name of the variable for this symbol
  345.          fuzzy_membership_set
  346.                   : defines the four points of a membership set and
  347.          truth    : the max truth value
  348.          center   : the center value
  349.       Example
  350.          SEGMENT main_control
  351.             CYCLE_TIME 0.1
  352.  
  353.             IN Reference   (0, 100)
  354.             OUT   Result   (0, 10)
  355.             LOCAL Temp  (-1, 1)
  356.  
  357.             SYMBOL small OF Reference (0, 0, 10, 20, 1.0)
  358.             SYMBOL strong  (8, 9, 10, 10, 1, 10)
  359.             . . .
  360.          END main_control;
  361.    The fuzzy symbol declaration is used to declare a named fuzzy
  362.    membership set.  This named symbol can then be used in the fuzzy
  363.    rules.  The symbol defines the shape of a trapezoid fuzzy
  364.    membership set, as described above, and the optional truth value
  365.    and the center value.  If the center value is specified, GAF
  366.    uses this value, otherwise GAF calculates the center of gravity
  367.    as the center value.  A symbol can be defined for all variables
  368.    or defined for a specific variable with "OF var_name" option. 
  369.    If a symbol is defined for a specific variable, it can only be
  370.    used for that variable.  Symbol names are not required to be
  371.    unique in a segment.  For example, two symbols "VERY_SMALL" can
  372.    be defined for two different variables "SPEED" and "POPULATION"
  373.    with two different shapes as in the following example.
  374.       IN Speed (-100, 100)
  375.       IN Population (0, 1000)
  376.       SYMBOL VerySmall OF Speed (-5, 0, 0, 5)
  377.       SYMBOL VerySmall OF Population (0, 50, 50, 100)
  378.  
  379. Math Processing Statement 
  380.    Besides fuzzy rule, GAF supports non-fuzzy math calculation: the
  381.    math statements.  The math statements are very similar to high
  382.    level languages such as C++ and Ada.  Math statements can be
  383.    further divided into two categories: condition statement and
  384.    assignment statement.
  385.  
  386.    Assignment statement is used to assign a variable with a value
  387.    or the result of a math formula.  The format for an assignment
  388.    statement is:
  389.    FORMAT
  390.       var_name = [ unary_op ] math_val [ binary_op math_val ] ;
  391.    Where var_name:   the name of the target variable
  392.          math_val:   a constant or name of a variable
  393.          unary_op:   unary operator: -
  394.          binary_op:  binary operator: + - * /
  395.  
  396.    The condition statement is used to direct GAF to execute
  397.    different assignments based on non-fuzzy boolean logic.  The
  398.    format for a condition statement is:
  399.    FORMAT
  400.       IF logic_expression THEN
  401.          true_statements
  402.       [ ELSE
  403.          false_statements ]
  404.       ENDIF;
  405.    Where  - logic expression is a math formula, if the result is
  406.             TRUE then the true assignment statements will be
  407.             executed.  If the result is FALSE, then the false
  408.             assignment statements will be executed.  Available
  409.             logical operators are:
  410.                >  greater than
  411.                <  less than
  412.                >= greater or equal
  413.                <= less or equal
  414.                == equal
  415.                <> not equal
  416.                && and operator
  417.                AND   and operator
  418.                || or operator
  419.                OR or operator
  420.           - true_statement and false_statement are assignment
  421.             statements as described.
  422.    Note that math statements are non-fuzzy statements (for current
  423.    version).  Since bivalent logic is simply an extreme of a fuzzy
  424.    set, GAF does not support "boolean" variable.  However, boolean
  425.    logic can be emulated by fuzzy variable as in this example.
  426.       LOCAL tmp_bool (0, 1)
  427.       LOCAL tmp_val (0, 10)
  428.  
  429.       IF tmp_bool THEN        ! use tmp_bool as a boolean
  430.          tmp_val = 3;
  431.       ENDIF;
  432.       IF ( tmp_bool == 1 ) THEN  ! compare tmp_bool with 1
  433.          tmp_val = 5;
  434.       END_IF;
  435.       IF ( tmp_val > 9 ) THEN
  436.          tmp_val = 9;
  437.       ENDIF;
  438.  
  439. Initialization: init_declaration
  440. Reset: reset_declaration
  441. Pre-Processing: pre_processing
  442. Post-Processing: post_processing
  443.    The initialization declaration defines how the segment will be
  444.    initialized.  The reset declaration defines how to reset a
  445.    segment when the segment is disabled.  Pre/Post processing
  446.    declarations define the statements to be executed before/after
  447.    fuzzy inference.
  448.  
  449.       FORMAT   [ [ INITIALIZATION
  450.                   init_statement(s) ]
  451.                [ RESET
  452.                   reset_statement(s) ]
  453.                [ < PRE_PROCESSING | BEGIN >
  454.                   pre_statement(s) ]
  455.                [ POST_PROCESSING
  456.                   post_statement(s) ]
  457.                END; ]
  458.       Where  - init_statements are math statements for
  459.                initializing the segment.
  460.              - reset_statements are math statements to reset the
  461.                segment.
  462.              - pre_statements are math statements to be executed
  463.                before the fuzzy rule inference for the segment.
  464.              - post_statements are math statements to be executed
  465.                after the fuzzy rule inference for the segment.
  466.       Example
  467.          INITIALIZATION
  468.             speed = 0;
  469.          PRE_PROCESSING
  470.             IF position > 50 THEN
  471.                speed = 3.5;
  472.             ELSE
  473.                speed = speed + 2;
  474.             END IF;
  475.          END;
  476.  
  477. Preset: preset_declaration
  478.    Just like the initialization and reset declarations, a preset
  479.    declaration is a sequence of assignments to setup the segment to
  480.    a known state.  Normally this is done by assigning values
  481.    (constants) to local and output variables.  There is no limit of
  482.    the number of presets in a segment.  Presets are used for
  483.    genetic adapt for testing new rules' result.  They also can be
  484.    requested by user during simulation and check modes.
  485.       FORMAT:  PRESET
  486.                   preset_statement(s)
  487.                END;
  488.       Example
  489.          PRESET
  490.             Reference = 100;
  491.             Position = 0;
  492.          END ;
  493.  
  494. Define Rule: rule_declaration
  495.    FCL uses IF THEN construct to define a fuzzy rule.  The IF
  496.    statement contains multiple fuzzy evaluations bound with AND or
  497.    OR.  The format of fuzzy evaluation is defined as:
  498.          variable IS symbol
  499.    which describes "What is the truth value of the current value of
  500.    'variable' in the fuzzy membership set 'symbol'?". The result of
  501.    the evaluation will be the truth value between 0 and 1 as
  502.    described in the symbol_declaration.  The overall result of the
  503.    IF statement will be the fuzzy AND/OR result (min/max of all
  504.    truth values).
  505.  
  506.    The THEN statement contains only one fuzzy induction.  The
  507.    format of a fuzzy induction is one of these forms:
  508.          variable IS symbol
  509.          variable  + symbol
  510.          variable  - symbol
  511.    The variable must be an OUT, INOUT, or LOCAL variable.  The
  512.    first format simply defines the result of 'variable' is the
  513.    'symbol' fuzzy membership set with the max truth be the overall
  514.    result from the IF statement.  The second and third format is to
  515.    increment/decrement the current 'variable' by the amount defined
  516.    by 'symbol'.
  517.  
  518.       Example
  519.          SEGMENT main_control
  520.             CYCLE_TIME 0.1
  521.  
  522.             IN Reference   (0, 100)
  523.             IN Speed (-1, 1)
  524.             OUT   Result   (0, 10)
  525.             LOCAL Temp  (-1, 1)
  526.  
  527.             SYMBOL small OF Reference (0, 0, 10, 20, 1.0)
  528.             SYMBOL slow OF Speed (0, 1, 2, 3, 1)
  529.             SYMBOL strong  (8, 9, 10, 10, 1, 10)
  530.  
  531.             IF Reference IS small AND Speed IS slow
  532.             THEN Result IS strong
  533.  
  534.             . . . .
  535.  
  536.          END main_control;
  537.  
  538.    A rule can be repeated more than once in a segment to intensify
  539.    the effect of the rule.
  540.  
  541. Data Table: data_declaration
  542.    The data table declaration provides user to specify data set in
  543.    the format similar to spread sheet.
  544.  
  545.       FORMAT   DATA_TABLE (inp1, [inp2, ...] out )
  546.                   inp1_val_0 [,] [inp2_val_0 ...] out_val_0 [,]
  547.                   inp1_val_1 [,] [inp2_val_1 ...] out_val_1 [,]
  548.                   inp1_val_2 [,] [inp2_val_2 ...] out_val_2 [,]
  549.                   . . .
  550.                ;
  551.       Where  - inp* are input variable names, i.e. must be IN,
  552.                INOUT, or LOCAL variables
  553.              - out is the output variable, i.e. must be OUT,
  554.                INOUT, or LOCAL variable
  555.              - inp1_val_* are values of variable inp1
  556.              - inp2_val_* are values of variable inp2
  557.              - out_val_* are values of output out
  558.  
  559.    The input variable names and output variable name declared
  560.    within the parenthsis determine the contents of the data table
  561.    entries and the order of data values appeared in the table.
  562.  
  563.    Note that the out value should be the output based on the input
  564.    values before it.  Normally, this is the case of data table
  565.    generated from a model.  For measured data, the skew of input
  566.    and output should be considered before building the data table.
  567.  
  568. Configuration: configuration_declaration
  569.    When starts up, GAF searches configuration file "GAF.CFG" under 
  570.    current directory or where GAF.EXE resides.  The configuration 
  571.    file is a text file for setting up the GAF environment.  The
  572.    format of the configuration file is a series of "attribute =
  573.    attribute_value;".  The attribute can be in any order and can be 
  574.    defined multiple times with the latter value overrides the
  575.    previous value.
  576.  
  577.       FORMAT   attr_name = attr_val;
  578.       WHERE  - attr_name is the name of the attribute, availble
  579.                attributes are listed below
  580.              - attr_val is the valid value for the specified
  581.                attribute
  582.  
  583.    FCL allows configuration information been declared within
  584.    "CONFIGURATION" and "END_CONFIGURATION;" keywords to override
  585.    those defined in the gaf.cfg file.  The format for declaring
  586.    configuration information in a segment is:
  587.  
  588.       FORMAT   CONFIGURATION
  589.                   attr_name = attr_val;
  590.                   . . .
  591.                END_CONFIGURATION;
  592.  
  593.    The following configuration attributes are provided by GAF.
  594.  
  595.    COLOR_MODE
  596.       Enable/disable color display.  Valid values are YES and NO. 
  597.       The default is COLOR_MODE = YES;
  598.  
  599.    MENU_COLOR
  600.       Sets the color for the system menu and pulldown menus. 
  601.       Available colors are: BLACK, BLUE, GREEN, CYAN, RED, MAGENTA,
  602.       BROWN, LIGHTGRAY, DARKGRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN,
  603.       LIGHTRED, LIGHTMAGENTA, YELLOW, WHITE.  The default is
  604.       MENU_COLOR = CYAN;
  605.  
  606.    MENU_TEXT_COLOR
  607.       Sets the foreground text color for the system menu and
  608.       pulldown menus.  The default is MENU_TEXT_COLOR = BLUE;
  609.  
  610.    HIGHLIGHT_COLOR
  611.       Sets the color for the highlight bar.  The default is
  612.       HIGHLIGHT_COLOR = GREEN;
  613.  
  614.    HIGHLIGHT_TEXT_COLOR
  615.       Sets the foreground text color for the highlighted entry.
  616.       The default is HIGHLIGHT_TEXT_COLOR = RED;
  617.  
  618.    DISPLAY_MODE
  619.       Initializes the display mode.  Available values are:
  620.       NORMAL_DISPLAY, DISPLAY_PLOT_ONLY, DISPLAY_WHOLE,
  621.       DISPLAY_NO_PLOT, DISPLAY_TEXT_ONLY.  Please refer to Display
  622.       section for details.
  623.       The default is DISPLAY_MODE = NORMAL_DISPLAY;
  624.  
  625.    WINDOW_SPLIT
  626.       Initializes the size of the text window.  The value is in
  627.       percentage of the screen.  Please refer to Display section
  628.       for details.
  629.       The default is WINDOW_SPLIT = 55;
  630.  
  631.    PLOT_DURATION
  632.       Assigns the duration of the trend plot in seconds.
  633.       The default is PLOT_DURATION = 5.0;
  634.  
  635.    TEXT_FONT
  636.    FONT_SIZE
  637.       Configures the text font.  Available font are: NORMAL and
  638.       SMALL.  The size should be 1 for normal font and 4 for small
  639.       font.
  640.       The default is TEXT_FONT = NORMAL; FONT_SIZE = 1;
  641.  
  642.    DISPLAY_LOCAL_VARIABLE
  643.       This attribute determines whether local variables will be
  644.       displayed along with input/output variables.
  645.       The default is DISPLAY_LOCAL_VARIABLE = NO;
  646.  
  647.    SIM_SCHEDULE_RATE
  648.       The SIM_SCHEDULE_RATE determines the simulated schedule rate. 
  649.       The value should be a floating number in seconds.
  650.       The default is SIM_SCHEDULE_RATE = 0.06;
  651.  
  652.    SIM_INC_RATE
  653.  
  654.       The SIM_INC_RATE attribute defines the increment of + and -
  655.       keys during simulation mode.  The default is SIM_INC_RATE =
  656.       0.005;
  657.  
  658.    EVAL_SAMPLE
  659.       This attribute defines how many samples should GAF take for
  660.       calculating average evaluation result during adaptation.
  661.       The default is EVAL_SAMPLE = 3;
  662.  
  663.    GENE_WEIGHT_INC
  664.       Defines the proportion weight increment for gene pool.
  665.       The default is GENE_WEIGHT_INC = 2;
  666.  
  667.    MAX_BEST_ITEM
  668.       Initializes the gene pool size, i.e. number of best genes
  669.       saved in the best list.  The default is MAX_BEST_ITEM = 10;
  670.  
  671.    TEST_TIME
  672.       The TEST_TIME attribute initializes the duration for each
  673.       evaluation cycle for adaptation.  The value is in seconds,
  674.       and default is TEST_TIME = 2.0;
  675.  
  676.    MIN_SCORE
  677.       This attribute sets the minimum evaluation score for the
  678.       adaptation mode.  The default is MIN_SCORE = 0.6;
  679.  
  680.    CHG_RULE_WEIGHT
  681.    ADJ_INPSET_WEIGHT
  682.    ADD_RULE_WEIGHT
  683.    ABLE_RULE_WEIGHT
  684.    CHG_CYCLE_WEIGHT
  685.    CHG_GAIN_WEIGHT
  686.       These attributes are used to assign the weight for genetic
  687.       adapting methods.  The values should be in integer, and the
  688.       defaults are 1.  Please refer Method section for details.
  689.  
  690.    ADJ_INPSET_MUTATE_WEIGHT
  691.    ADJ_INPSET_CROSSOVER_WEIGHT
  692.    ADJ_INPSET_INTENSIFY_WEIGHT
  693.    ADJ_INPSET_BROADEN_WEIGHT
  694.    ADJ_INPSET_SHIFT_WEIGHT
  695.    ADJ_INPSET_CHG_TRUTH_WEIGHT
  696.    ADJ_INPSET_SCALE
  697.       These attributes are used to assign the weight for adjusting
  698.       the input fuzzy membership set.  The values should be in
  699.       integer, and the defaults are 1.  Please refer Method section
  700.       for details.
  701.  
  702.    MAX_RULE
  703.       The MAX_RULE defines the maximum number of rules allowed
  704.       during adaptation.  The default is zero, i.e. there is no
  705.       limit for number of rules.
  706.  
  707.    MAX_CYCLE_RATE
  708.    MIN_CYCLE_RATE
  709.       These two attributes define the limit of cycle rate for the
  710.       adaptation.  The default are:
  711.             MAX_CYCLE_RATE = 0.50;
  712.             MIN_CYCLE_TIME = 0.03;
  713.  
  714.    EVAL_NULL_BAND
  715.       Defines the null band for the score of evaluation result. 
  716.       The default is EVAL_NULL_BAND = 0.02;
  717.  
  718.    ENABLE_ADAPT_LOG
  719.    ENABLE_DETAIL_ADAPT_LOG
  720.    ENABLE_PLOT_DATA_LOG
  721.       These attributes initialize the status of enable or disable
  722.       adapt log, adapt detail log, or the plot data log.  Valid
  723.       values are: YES to enable and NO to disable.  The defaults
  724.       are NO.
  725.  
  726.    ADAPT_LOG_FILE
  727.    PLOT_DATA_FILE
  728.    ADAPT_REPORT_FILE
  729.    STATISTIC_REPORT_FILE
  730.       These attributes define the file names for the adapt log,
  731.       plot data, adapt report, or the statistic report.  The
  732.       defaults are:
  733.             ADAPT_LOG_FILE = "adaptlog.log";
  734.             PLOT_DATA_FILE = "adaptlog.dat";
  735.             ADAPT_REPORT_FILE = "adaptlog.rpt";
  736.             STATISTIC_REPORT_FILE = "adaptlog.sta";
  737.